package tests;

import common.Utils;
import org.junit.jupiter.api.Assertions;
import org.openqa.selenium.By;

public class ActivityListPage extends Utils {

    private static String url = "http://82.156.185.199:8080/admin.html";

    public ActivityListPage() {
        super(url);
    }

    public void test(){
        driver.switchTo().defaultContent();
        driver.findElement(By.cssSelector("#activitiesList")).click();
        // switchTo().frame 切换到iframe
        driver.switchTo().frame(0);
        // "活动列表"
        driver.findElement(By.cssSelector("body > div > h2"));
        // "首页" 按钮
        driver.findElement(By.cssSelector("body > div > div.pagination > button:nth-child(1)"));
        // "上一页" 按钮
        driver.findElement(By.cssSelector("body > div > div.pagination > button:nth-child(2)"));
        // "下一页" 按钮
        driver.findElement(By.cssSelector("body > div > div.pagination > button:nth-child(4)"));
        // "尾页" 按钮
        driver.findElement(By.cssSelector("body > div > div.pagination > button:nth-child(5)"));
    }
}
